
#include <gtk/gtk.h>


GtkWidget *window;
GtkWidget *common_dialog;
GtkWidget *about_dialog;


_declspec(dllexport) void on_menu_item_quit_activate(GtkWidget *widget, gpointer user_data)
{
	gtk_main_quit();
}


_declspec(dllexport) void on_menu_item_about_activate(GtkWidget *widget, gpointer user_data)
{
	gtk_widget_show(about_dialog);
}


int main(int argc, char *argv[])
{
    GtkBuilder *builder;

    gtk_init (&argc, &argv);
    
    builder = gtk_builder_new();
    gtk_builder_add_from_file (builder, "gtk-demo.glade", NULL);
	
    window = GTK_WIDGET(gtk_builder_get_object(builder, "window"));
	about_dialog = GTK_WIDGET(gtk_builder_get_object(builder, "about_dialog"));
	common_dialog = GTK_WIDGET(gtk_builder_get_object(builder, "common_dialog"));

    gtk_builder_connect_signals(builder, NULL);

    g_object_unref((GObject *)builder);
    
    gtk_widget_show(window);
	gtk_widget_show(common_dialog);
    gtk_main ();
    return 0;
}

